<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>查看购物车表明细</title>
</head>
<body>
<form>
    <table border="1">
        <tr><td colspan="2"><h1>查看购物车表明细</h1></td></tr>
        <tr>
            <td>回购车ID</td>
            <td>
                   <span id="cartId"></span>
            </td>
        </tr>
        <tr>
            <td>用户ID</td>
            <td>
                   <span id="customerId"></span>
            </td>
        </tr>
        <tr>
            <td>商品ID</td>
            <td>
                   <span id="productId"></span>
            </td>
        </tr>
        <tr>
            <td>回购价格</td>
            <td>
                   <span id="price"></span>
            </td>
        </tr>
        <tr>
            <td>加入购物车时间</td>
            <td>
                   <span id="addTime"></span>
            </td>
        </tr>
        <tr>
            <td>最后修改时间</td>
            <td>
                   <span id="modifiedTime"></span>
            </td>
        </tr>
        <tr>
            <td>其他</td>
            <td>
                   <span id="other1"></span>
            </td>
        </tr>
        <tr>
            <td>其他</td>
            <td>
                   <span id="other2"></span>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="button" id="fanhui" value="返回"/>
            </td>
        </tr>
    </table>
</form>
<script src="/js/jquery-1.12.4.js"></script>
<script>
    var param = location.href.substring(location.href.indexOf('?')+1);
    $.getJSON("/ordercart/findById.json",param,function(detail){
        $("#cartId").text(detail.cartId);
        $("#customerId").text(detail.customerId);
        $("#productId").text(detail.productId);
        $("#price").text(detail.price);
        $("#addTime").text(detail.addTime);
        $("#modifiedTime").text(detail.modifiedTime);
        $("#other1").text(detail.other1);
        $("#other2").text(detail.other2);
    });
    $("#fanhui").click(function(){
        location.href="/admin/ordercart/list.html";
    });
</script>

</body>
</html>